<template>
	<view class="kh-bill-detail-layout">
		<!-- 账单信息 -->
		<view class="paymeny-bill-detail-info">
			<view class="paymeny-bill-detail-info-item">
				<text>流水ID</text>
				<text>{{jsonData.id}}</text>
			</view>
			<view class="paymeny-bill-detail-info-item">
				<text>创建时间</text>
				<text>{{jsonData.createTime}}</text>
			</view>
		</view>
		<!-- 账单明细 -->
		<view class="paymeny-bill-detail-info">
			<view class="paymeny-bill-detail-info-item">
				<text>明细ID</text>
				<text>{{jsonData.id}}</text>
			</view>
			<view class="paymeny-bill-detail-info-item">
				<text>考核类型</text>
				<text>{{getTypeText()}}</text>
			</view>
			<view class="paymeny-bill-detail-info-item">
				<text>考核扣款</text>
				<text>¥{{jsonData.deductAmount}}</text>
			</view>
			<view class="paymeny-bill-detail-info-item">
				<text>产品名称</text>
				<text>{{jsonData.produceName}}</text>
			</view>
			<view class="paymeny-bill-detail-info-item">
				<text>产品政策</text>
				<text>{{jsonData.policyName}}</text>
			</view>
			<view class="paymeny-bill-detail-info-item">
				<text>机具编号</text>
				<text>{{jsonData.ksnNo}}</text>
			</view>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps(['data'])
	const jsonData = JSON.parse(decodeURIComponent(props.data))
	console.log(jsonData)
	// 获取考核类型
	const getTypeText = ()=>{
		if(jsonData.assessmentType == '01'){
			return '未激活'
		}
		else if(jsonData.assessmentType == '02'){
			return '未绑定'
		}
		else if(jsonData.assessmentType == '03'){
			return '伪激活'
		}
		return ''
	}
</script>

<style lang="scss" scoped>
	.kh-bill-detail-layout {
		padding: 30rpx;
		.paymeny-bill-detail-info {
			background-color: #fff;
			padding: 30rpx;
			border-radius: 16rpx;

			.paymeny-bill-detail-info-item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-size: 26rpx;

				&:nth-child(n+2) {
					margin-top: 20rpx;
				}
			}

			.paymeny-bill-detail-info-title {
				font-size: 26rpx;
				font-weight: 500;
				color: $xh-color-6;

			}
			&:nth-child(2){
				margin-top: 30rpx;
			}
		}
	}
</style>